home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Languages / CW MacMindy 1.4 / Examples / Libraries / beep.dyl next >
Encoding:
Text File  |  1995-11-14  |  567 b   |  28 lines  |  [TEXT/CWIE]

  1. library:    BeepLib
  2. module:        Beep
  3. author:        Patrick C. Beard <beard@apple.com>
  4.  
  5. /*
  6.     beep.dyl
  7.  
  8.     This version demonstrates using a separately compiled library.
  9.  */
  10.  
  11. define library BeepLib
  12.     use Dylan;                // use the Dylan library.
  13.     export Beep;            // provide the Beep module.
  14. end library BeepLib;
  15.  
  16. define module Beep
  17.     use Dylan;                // all programs need this.
  18.     use Cheap-IO;            // imports "puts & putc"
  19.     export beep;            // make beep available to the world.
  20. end module Beep;
  21.  
  22. // an exported method.
  23.  
  24. define method beep ()
  25.     puts("*beep*\n");
  26.     putc(as(<character>, 7));
  27. end method;
  28.